// 签名
import _bale from '../utils/package.js'
// 获取不同的接口地址
import { USER_API } from '../config/index.js'
import { Service } from '../utils/server.js'
class CouponModel extends Service {
  // 查询活动优惠券
  selectActivityCoupon(params) {
    return this.postRequest(USER_API + '/coupon/selectActivityCoupon', {
      data: _bale('selectActivityCoupon', params)
    })
  }
  //激活优惠券
  activateCoupon(params) {
    return this.postRequest(USER_API + '/coupon/activateCoupon', {
      data: _bale('activateCoupon', params)
    })
  }
  //我的优惠券
  selectMyCoupon(params){
    return this.postRequest(USER_API + '/coupon/selectMyCoupon', {
      data: _bale('selectMyCoupon', params)
    })
  }
  //添加优惠券
  addCoupon(params){
    return this.postRequest(USER_API + '/coupon/addCoupon', {
      data: _bale('addCoupon', params)
    })
  }
  //选择优惠券
  chooseCoupon(params){
    return this.postRequest(USER_API + '/coupon/chooseCoupon', {
      data: _bale('chooseCoupon', params)
    })
  }
}
export { CouponModel }